package com.briup.day17;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author ThinkBook
 */

//collection接口方法测试
public class Test08_Collection {
    public static void main(String[] args) {
    //接口引用指向实现类对象
    Collection coll = new ArrayList();
    //集合中只能添加 引用对象
        coll.add(1);        //int --> Integer
        coll.add(3.14);     //double --> Double
        coll.add("hello");
        coll.add('a');
        coll.add(2.3F);
        coll.add(false);

        System.out.println(coll.size());
        System.out.println(coll.isEmpty());
        System.out.println(coll);
    }
}
